import request from '@/utils/request'
const baseUrl = process.env.VUE_APP_BASE_API_MQTT

// 消息订阅
export function subTopic(query) {
  return request({
    url: baseUrl + '/mqtt/subTopic',
    method: 'get',
    params: query
  })
}

// 主题发布
export function sendMessage(data) {
  return request({
    url: baseUrl + '/mqtt/pubTopic',
    method: 'post',
    data
  })
}
